#include<stdio.h>
void FunctionTest(int n);
int main(void)
{
	int n;
	do
	{
		printf("Input n:");
		scanf_s("%d", &n);
	} while (!(n >= 1 && n <= 100));
	FunctionTest(n);
	return 0;
}
void FunctionTest(int n)
{
	int count = 0;
	while (n != 1)
	{
		count++;
		if (n % 2 == 1)
		{
			printf("Step%d:%d*3+1=%d\n", count, n, n * 3 + 1);
			n = n * 3 + 1;
		}
		else
		{
			printf("Step%d:%d/2=%d\n", count, n, n / 2);
			n /= 2;
		}
	}
}
